<?php
namespace Admin\Controller;
use Think\Controller;
class BaseController extends Controller{
    //控制权限的
    public function _initialize() {
        header("Content-type: text/html; charset=utf-8");
        
       /* $notAuth = in_array(MODULE_NAME,explode(',',C('NOT_AUTH_MODULE'))) || in_array(ACTION_NAME,explode(',',C('NOT_AUTH_ACTION')));
        if(C('USER_AUTH_ON') && !$notAuth){
			import('ORG.Util.RBAC');
			$_SERVER['HTTP_REFERER'];
			RBAC::AccessDecision() || $this->key();
		}
        
        $this->key();*/
	}
	
	//判断是否登录和有没有操作权限
    public function key(){
        if(!$_SESSION['username']){
            $this->redirect('Index/login');
            $this->redirect('Login/index');
        }else{
           $this->error('你没有权限',U('Index/panel'));
        }
    }
}